//package com.jiezhuo.config;
//
//
//import com.jiezhuo.entity.FileMonitor;
//import com.jiezhuo.listener.FileListener;
//import org.springframework.beans.factory.InitializingBean;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.stereotype.Service;
//
//import javax.websocket.server.ServerEndpoint;
//
//@Service
//
//public class SystemConfig implements InitializingBean {
//    @Value("${listener.path}")
//    String path;
//    @Override
//    public void afterPropertiesSet() throws Exception {
//        FileMonitor fileMonitor = new FileMonitor(5_000L);
//        fileMonitor.monitor(path, new FileListener());
//        fileMonitor.start();
//    }
//}
